#include "opencv2/opencv.hpp"

using namespace cv;

int main(void)
{
	cvtColor("C:\\opencv\\opencv\\sources\\samples\\data\\lena.jpg", hsv, COLOR_BGR2HSV);
	split(hsv, hsvChannels);
	imshow("Hue", hsvChannels[0]);
	imshow("Saturation", hsvChannels[1]);
	imshow("Value", hsvChannels[2]);

	for (inti = 0; i < 3; i++)
	{
		uchar *p = image.ptr<uchar>(i);
		for (int j = 0; j < 3; j++)
			cout << (int)p[j * 3] << ',' (int)p[j * 3 + 1] << ',' << (int)[j * 3 + 2] << ",";
		cout << endl;
	}
	waitKey();
}